/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:46 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Runtime.Serialization;
namespace hou_elearning.Entity
{
    [DataContract]
    public class KhoahocEntity
    {
        public KhoahocEntity()
        {
			m_pk_ikhoahocid=0;
			m_stenkhoahoc="";
            m_skyhieu = "";
			m_sghichu="";
			m_isoluongdukien=0;
            m_itrangthai = 1;
			m_dngaytao=DateTime.Now;
			m_dngaycapnhat=DateTime.Now;
			m_fk_inguoitaoid=0;
            m_fk_inguoicapnhatid = 0;
			m_sanhminhhoa="";
			m_fk_igiangvienid=1;
			m_fk_ichungchiid=0;
        }
		private Int64 m_pk_ikhoahocid;
        [DataMember]
		public Int64 PK_iKhoahocID
		{
			get { return m_pk_ikhoahocid ; }
			set { m_pk_ikhoahocid = value; }
		}
		private String m_stenkhoahoc;
        [DataMember]
		public String sTenkhoahoc
		{
			get { return m_stenkhoahoc ; }
			set { m_stenkhoahoc = value; }
		}
        private String m_skyhieu;
        [DataMember]
        public String sKyhieu
        {
            get { return m_skyhieu; }
            set { m_skyhieu = value; }
        }
		private String m_sghichu;
        [DataMember]
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}
		private Int16 m_isoluongdukien;
        [DataMember]
		public Int16 iSoluongdukien
		{
			get { return m_isoluongdukien ; }
			set { m_isoluongdukien = value; }
		}
        private int m_itrangthai;
        [DataMember]
        public int iTrangthai
        {
            get { return m_itrangthai; }
            set { m_itrangthai = value; }
        }
		private DateTime m_dngaytao;
        [DataMember]
		public DateTime dNgaytao
		{
			get { return m_dngaytao ; }
			set { m_dngaytao = value; }
		}
		private DateTime m_dngaycapnhat;
        [DataMember]
		public DateTime dNgaycapnhat
		{
			get { return m_dngaycapnhat ; }
			set { m_dngaycapnhat = value; }
		}
		private Int64 m_fk_inguoitaoid;
        [DataMember]
		public Int64 FK_iNguoitaoID
		{
			get { return m_fk_inguoitaoid ; }
			set { m_fk_inguoitaoid = value; }
		}
        private Int64 m_fk_inguoicapnhatid;
        [DataMember]
        public Int64 FK_iNguoicapnhatID
        {
            get { return m_fk_inguoicapnhatid; }
            set { m_fk_inguoicapnhatid = value; }
        }
		private String m_sanhminhhoa;
        [DataMember]
		public String sAnhminhhoa
		{
            get { return m_sanhminhhoa; }
            set { m_sanhminhhoa = value; }
		}
		private Int64 m_fk_igiangvienid;
        [DataMember]
		public Int64 FK_iGiangvienID
		{
			get { return m_fk_igiangvienid ; }
			set { m_fk_igiangvienid = value; }
		}
		private Int16 m_fk_ichungchiid;
        [DataMember]
		public Int16 FK_iChungchiID
		{
			get { return m_fk_ichungchiid ; }
			set { m_fk_ichungchiid = value; }
		}

        #region Comparison
        public static List<KhoahocEntity> Sort(List<KhoahocEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(KhoahocEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<KhoahocEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<KhoahocEntity> COMPARISON_PK_iKhoahocID
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.PK_iKhoahocID.CompareTo(other.PK_iKhoahocID);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_sTenkhoahoc
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.sTenkhoahoc.CompareTo(other.sTenkhoahoc);
				};
			}
		}
        public static Comparison<KhoahocEntity> COMPARISON_sKyhieu
        {
            get
            {
                return delegate(KhoahocEntity entity, KhoahocEntity other)
                {
                    return entity.sKyhieu.CompareTo(other.sKyhieu);
                };
            }
        }
		public static Comparison<KhoahocEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_iSoluongdukien
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.iSoluongdukien.CompareTo(other.iSoluongdukien);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_dNgaytao
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.dNgaytao.CompareTo(other.dNgaytao);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_dNgaycapnhat
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.dNgaycapnhat.CompareTo(other.dNgaycapnhat);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_FK_iNguoitaoID
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.FK_iNguoitaoID.CompareTo(other.FK_iNguoitaoID);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_FK_iTainguyenminhhoa
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.sAnhminhhoa.CompareTo(other.sAnhminhhoa);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_FK_iGiangvienID
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.FK_iGiangvienID.CompareTo(other.FK_iGiangvienID);
				};
			}
		}
		public static Comparison<KhoahocEntity> COMPARISON_FK_iChungchiID
		{
			get
			{
				return delegate(KhoahocEntity entity,KhoahocEntity other)
				{
					return entity.FK_iChungchiID.CompareTo(other.FK_iChungchiID);
				};
			}
		}
        #endregion
    }
}
